package com.beimihu.leetcode.基本算法;

public class SelectionSort {

    public void sort(int arr[]){
        if (arr == null){
            return;
        }
        for(int i = 0 ; i < arr.length - 1 ;i++){
            for(int j = i  ; j < arr.length ; j++){
                if (arr[i] > arr[j]){
                    int temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }
            }
        }

    }
}
